<?php include load_tpl('header');?>
<p id="breadcrumbs">
    <a href="/">首页</a> <b>»</b> 
    <span>属性组列表管理</span>
</p>

<div class="box">
  <div class="left"></div>
  <div class="right"></div>
  <div class="heading">
    <h1 style="background-image: url('./images/shipping.png');">属性组列表</h1>
  </div>
  <div class="content">
      <table class="list">
        <thead>
          <tr>
            <th width="1" style="text-align: center;"><input type="checkbox"/></th>
            <th class="left">属性组名称
              </th>
            <th class="right">操作</th>
          </tr>
        </thead>
        <tbody>
		<?php if($list){foreach($list as $attr){?>
            <tr>
            <td style="text-align: center;"><input type="checkbox" name="bid" value="<?php if(isset($attr['attribute_id']))echo $attr['attribute_id'];?>" />
            </td>
            <td class="left"><?php if(isset($attr['name']))echo $attr['name'];?></td>
            <td class="right">
			<a class="button" href="index.php?mod=attributeValue&act=list&attr_id=<?php if(isset($attr['attribute_id']))echo $attr['attribute_id'];?>"><span>编辑属性值</span></a>
			<a class="button" href="index.php?mod=attribute&act=list&attr_id=<?php if(isset($attr['attribute_id']))echo $attr['attribute_id'];?>"><span>编辑</span></a>
			<a class="button"  href="index.php?mod=attribute&act=del&attr_id=<?php if(isset($attr['attribute_id']))echo $attr['attribute_id'];?>"><span>删除</span></a>
            </td>
          </tr>
		  <?php } }else{?>
		  <tr>
		  <td colspan="3">无属性!</td>
		  </tr>
		  <?php }?>
        </tbody>
      </table>
</div>

<form action="" method="post" enctype="multipart/form-data" id="form">
	<div style="float:left;margin:4px 10px;">属性名称:<input type="text" name="name" value="<?php if(isset($attr_arr['name']))echo $attr_arr['name'];?>"/><a onclick="$('#form').submit();" class="button"><span>添加</span></a></div>
	<input type="hidden" name="attr_id" value="<?php if($id) echo $id;?>"
 </form>


<?php include load_tpl('footer');?>
<script type="text/javascript">
</script>